﻿@using Daheng.Domain
@using GMS.Framework.Web.Controls
@using BookManager.Domain;
@{
    Layout = "~/Views/Shared/_Layout.Edit.cshtml";
}
@section PageSpecificStyleSheetIncludes{
    <style type="text/css">
        .controls label {
            display: inline;
        }
    </style>
}
@section PageSpecificJavascriptIncludes{
}
@section MainContent{
    <div class="portlet-body form-horizontal form-bordered form-row-stripped">
        <div class="row-fluid">

            <div class="control-group">
                <label class="control-label"><span class="required">*</span>文件名：</label>
                <div class="controls">
                    <input type="file" id="filename" name="filename" />
                   <span class="help-inline"><a id="btnUpload" />更新</a></span>
                    <input type="hidden" id="hidFileName" name="hidFileName" />
                </div>
            </div>

           

        </div>
    </div>
}

<script>
    $(function () {
        $("#filename").change(function () {
            var file = $("#filename").val();
            $("#hidFileName").val(file.replace(/^.+?\\([^\\]+?)(.[^.\\]*?)?$/i, "$1"));
            $("#btnUpload").prop("href", "Book://new-file$:" + file);
        });

    })

</script>

